
import Api from '@/database'
import { defineWrappedResponseHandler } from '../utils/handler'

const handler = defineEventHandler(async (e) => {
  const { sql, params } = await readBody(e)
  return await Api.native.raw(sql, params)
})

export default defineWrappedResponseHandler(handler)